#include<func.h>
int main(int argc,char* argv[])
{
    ARGS_CHECK(argc,2)
    int ret;
    struct stat buf;
    char buf_time[1024];
    int flag=0;
    ret=stat(argv[1],&buf);
    ERROR_CHECK(ret,-1,"stat");
    memset(buf_time,0,sizeof(buf));
    strcpy(buf_time,ctime(&buf.st_mtime)+4);
    char buf_tmp[1024]={0};
    for(int i=0;i<strlen(buf_time);i++)//截断时间
    {
       
        if(buf_time[i]==':')
        {
            if(flag==0)
            {
                flag=1;
                buf_tmp[i]=buf_time[i];
            }
            else
            {break;}
        }
        else
        {buf_tmp[i]=buf_time[i];}
    }

    printf("%x %ld %s %s %ld %s \n",buf.st_mode,buf.st_nlink,getpwuid(buf.st_uid)->pw_name,\
    getgrgid(buf.st_gid)->gr_name,buf.st_size,buf_tmp);
    return 0;
}